package com.css.bjdt_core.report.entity;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;

import com.css.bjdt_core.executive.entity.IType;

import lombok.Data;

//表计算表达式实体定义
@Data
@Table("RPT_TEMPLATE_CALC")
public class RptTemplateCalc {
	@Name
	@Column("CALC_ID")
	private String calcId;
	@Column("CALC_FORMULA")
	private String calcFormula;
	@Column("CALC_DESC")
	private String calcDesc;
	@Column("CALC_TYPE")
	private String calcType;
	@Column("TEMPLATE_ID")
	private String templateId;
	@Column("CALC_FORMULA_SHOW")
	private String calcFormulaShow;
	@Column("ORDER_ID")
	private Integer orderId;
	@Column("AREA_TEMPORARY_ID")
	private String areaTemporaryId;

	public enum CalcType implements IType {
		//行计算
		row(IType.TABLE_INNER_ROW),
		//列计算
		col(IType.TABLE_INNER_COL),
		//单元格计算
		cell(IType.TABLE_INNER_CELL);

		private String key;

		CalcType(String key) {
			this.key = key;
		}

		public String getKey() {
			return key;
		}
	}

}
